// Copyright  2004-2008 Backplane Ltd.
//
// This file is part of DOM3XPath
//
// DOM3XPath is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3 of the License, or (at your
// option) any later version.
//
// DOM3XPath is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License
// along with DOM3XPath. If not, see <http://www.gnu.org/licenses/>.
//	
//
//   $Id$
// stdafx.h : include file for standard system include files,
//      or project specific include files that are used frequently,
//      but are changed infrequently

#if !defined(AFX_STDAFX_H__9395E3B0_4F59_4A44_9B9A_B55DD177A2A7__INCLUDED_)
#define AFX_STDAFX_H__9395E3B0_4F59_4A44_9B9A_B55DD177A2A7__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define STRICT
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
#define _ATL_APARTMENT_THREADED

#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
extern CComModule _Module;
//#define _ATL_DEBUG_REFCOUNT
#include <atlcom.h>
#include <atlrx.h>
#ifdef USE_MSXML_2
	#include <msxml2.h>
#else
	#include <msxml6.h>
#endif
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
HRESULT InitGlobals();
extern CComPtr<IXMLDOMDocument2> g_pXSL;
extern CComPtr<IXMLDOMDocument3> g_FTXMLDOM;
extern CComBSTR g_sHelperURI;
extern CAtlRegExp<CAtlRECharTraitsW> g_re;

template <class T>
inline void safeRelease(T *& p)
{
	if(p)
	{
		p->Release();
		p = NULL;
	}
}
template <class T>
inline void dbg_safeRelease(T *& p)
{
	if(p)
	{
		long l = p->Release();
		p = NULL;
		ATLTRACE("Release called, Refcount=%d\n",l);
	}
}
/*	#ifdef _DEBUG
		#define safeRelease dbg_safeRelease
	#else
		#define safeRelease _safeRelease
	#endif
*/
 #endif // !defined(AFX_STDAFX_H__9395E3B0_4F59_4A44_9B9A_B55DD177A2A7__INCLUDED)

//	removed from link settings
//	kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib